import http from '@/utils/http'
import Qs from 'qs'

const _QUESTIONNAIRE_URL = '/rest/customer/system/settings'

export default {
  getInfo (cb) {
    http.get(_QUESTIONNAIRE_URL).then(response => cb(response)).catch(trace => cb(trace.response))
  },
  modify (list, cb) {
    let postData = Qs.stringify(list)
    http.post(_QUESTIONNAIRE_URL, postData, {
      headers: {
        'Content-Type': 'application/x-www-form-urlencoded'
      }
    }).then(response => cb(response)).catch(trace => cb(trace.response))
  }
}
